io.write("DBG:Initialized done.\n");

local base = _G
module("main")

function main()
	base.io.write("========== Welcome ==========\n")
	base.io.write("1.Query stock\n")
	base.io.write("2.Query order\n")
	base.io.write("3.Query Pending Order\n")
	base.io.write("Please input your choose: ")
	local num = base.io.read()
	local m
	local f
	
	if num == "1" then
		m = base.require("CLI.query_stock")
		f="Query"
	elseif num==2 then
		m = base.require("CLI.query_order")
		f = "Query"
	elseif num == 3 then
		m = base.require("CLI.query_order")
		f = "QueryForPendingOrder"
	end
	m.main(f)
end